package com.jyxy.service.web;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;
import com.jyxy.service.web.base.BaseController;

public class WormCountController extends BaseController
{
  public void intervalDataSum() {
    int sum = Db.queryInt("SELECT SUM(day_increment) FROM `zsj_table_insert_record` WHERE record_date=CURDATE()").intValue();
    rendSuccess(Integer.valueOf(sum));
  }
  
  public void interfaceDataSum() {
	  
	    Record sum = Db.findFirst("SELECT (SELECT COUNT(*) FROM service.service_status WHERE status !=200) error,(SELECT COUNT(*) FROM service.service_status) nomal,(SELECT COUNT(1) FROM sys_api_log) time,(select COUNT(*) from sys_api_log where TO_DAYS(create_date) = TO_DAYS(NOW())) number;");
	    rendSuccess(sum);
	  }
  public void interfaceDatatote() {
	  
	    List<Record> tote = (List<Record>) Db.find("SELECT * FROM service.service_status");
	    rendSuccess(tote);
	  }
}